<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>2019-nCoV</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="./css/font.css">
        <link rel="stylesheet" href="./css/xadmin.css">
        <link rel="stylesheet" href="./css/my-css.css">
        <script src="./lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="./js/xadmin.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <blockquote class="layui-elem-quote">欢迎管理员：
                                <span sec:authentication="name">xxx</span>！当前时间：<span id="start"></span>
                            </blockquote>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header"><span th:utext="'更新至&nbsp;'+${domesticData.publishTime}"></span><span style="float:right; font-weight: bold;">国内实时</span></div>
                        <div class="layui-card-body ">
							<ul
								class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>确诊病例</h3>
										<p>
											<span style="color: #e83132; font-size: 30px;" th:text="${domesticData.confirmed}">-</span>
										</p>
								</a></li>
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>疑似病例</h3>
										<p>
											<span style="color: #ec9217; font-size: 30px;" th:text="${domesticData.suspected}">-</span>
										</p>
								</a></li>
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>治愈病例</h3>
										<p>
											<span style="color: #10aeb5; font-size: 30px;" th:text="${domesticData.healed}">-</span>
										</p>
								</a></li>
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>死亡病例</h3>
										<p>
											<span style="color: #4d5054; font-size: 30px;" th:text="${domesticData.dead}">-</span>
										</p>
								</a></li>
							</ul>
						</div>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header"><span th:utext="'更新至&nbsp;'+${foreignData.publishTime}"></span><span style="float:right; font-weight: bold;">国外实时</span></div>
                        <div class="layui-card-body ">
							<ul
								class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>确诊病例</h3>
										<p>
											<span style="color: #e83132; font-size: 30px;" th:text="${foreignData.confirmed}">-</span>
										</p>
								</a></li>
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>疑似病例</h3>
										<p>
											<span style="color: #ec9217; font-size: 30px;" th:text="${foreignData?.suspected}?${foreignData?.suspected}:'-'">-</span>
										</p>
								</a></li>
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>治愈病例</h3>
										<p>
											<span style="color: #10aeb5; font-size: 30px;" th:text="${foreignData.healed}">-</span>
										</p>
								</a></li>
								<li class="layui-col-md3 layui-col-xs"><a href="javascript:;"
									class="x-admin-backlog-body">
										<h3>死亡病例</h3>
										<p>
											<span style="color: #4d5054; font-size: 30px;" th:text="${foreignData.dead}">-</span>
										</p>
								</a></li>
							</ul>
						</div>
                    </div>
                </div>
                
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">开发团队</div>
                        <div class="layui-card-body ">
                            <table class="layui-table">
                                <tbody>
                                    <tr>
                                        <th>版权所有</th>
                                        <td>woodwhales<a href="https://www.woodwhales.cn/" target="_blank">woodwhales' blog</a></td>
                                    </tr>
                                    <tr>
                                        <th>开发者</th>
                                        <td>木鲸鱼</td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <style id="welcome_style"></style>
                <div class="layui-col-md12">
                    <blockquote class="layui-elem-quote layui-quote-nm">本系统目前由个人独立维护并提供技术支持。</blockquote></div>
            </div>
        </div>
        </div>
        <script type="text/javascript">
        layui.use('layer', function(){
        	var $ = layui.jquery;
        	
        $(function() {
            var t = null;
            t = setTimeout(time, 1000);//開始运行
            function time() {
                clearTimeout(t);//清除定时器
                dt = new Date();
                var year = dt.getFullYear();
                var month = dt.getMonth() + 1;//(0-11,0代表1月)
                var date = dt.getDate();//获取天
                var num = dt.getDay();//获取星期
                var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
                var hour = dt.getHours();//获取时
                var minute = dt.getMinutes();//获取分
                var second = dt.getSeconds();//获取秒
                //分秒时间是一位数字，在数字前补0。
                date = extra(date);
                month = extra(month);
                minute = extra(minute);
                second = extra(second);
                document.getElementById("start").innerHTML = year + " - " + month + " - " + date + " - " + hour + "：" + minute + "：" + second + " " + weekday[num];
                t = setTimeout(time, 1000); //设定定时器，循环运行
            }
        });
        
    	//补位函数。
        function extra(x) {
            //如果传入数字小于10，数字前补一位0。
            if (x < 10) {
                return "0" + x;
            }
            else {
                return x;
            }
        }
        });
        </script>
    </body>
</html>